<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
	<spring:message var="pageTitle" code="forum.add.sujet.pageTitle" />
<%@ taglib uri="http://ckeditor.com" prefix="ckeditor" %>	
<html>
<head>
<spring:url value="/resources/ckeditor/ckeditor.js" var="ckeditor_url" />
<spring:url value="/resources/ckeditor/adapters/jquery.js" var="ckeditor_jquery_url" />
<script type="text/javascript" src="${ckeditor_url}"><jsp:text/></script>
<script type="text/javascript" src="${ckeditor_jquery_url}"><jsp:text/></script>
<link href="<%=request.getContextPath()%>/resources/css/forms.css" rel="stylesheet"> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>${pageTitle}</title>
</head>
<body>
	<div id="addSujetForm">
		<h2 class="centre">${pageTitle}</h2>
		<form:form id="formMessage" method="post" action="" modelAttribute="sujet">
		<form:errors path="*">
			<div><spring:message code="error.global"/></div>
		</form:errors>
		<fieldset>

		<div class="formseparator">
			<spring:message code="forum.add.sujet.title"/>
			<form:input path="titre" cssClass="short" cssErrorClass="short error"/>
			<form:errors path="titre" htmlEscape="false" />
		</div>
		<div class="formseparator">
			<spring:message code="forum.add.sujet.content"/>
			<form:textarea path="contenu" cssClass="short" cssErrorClass="short error"/>
			<form:errors path="contenu" htmlEscape="false" />
		</div>
		<div class="formseparator">
			<form:hidden path="forum" />
		</div>	
		<div class="formseparator">
			<form:hidden path="createur.idUser"/>
		</div>					 
		<div class="formseparator">
			<input type="submit" value="enregistrer" class="btn btn-lg btn-primary "  />
		</div>	
		 
		
		</fieldset>
           <script>
                CKEDITOR.replace( 'contenu' );
            </script>		
		</form:form>
	</div>
</body>
</html>